package com.delu.feign;

import com.delu.data.Result;
import com.delu.dto.UserPhonDTO;
import com.delu.dto.UsersDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(value ="delu-rental-user-service")
public interface UserFeign {
    @GetMapping("/user")
    public Result<String> login(@RequestParam("usrname") String usrname, @RequestParam("password")String password);
    @GetMapping("/user/getUser")
    public Result<UserPhonDTO> selectUserById(@RequestParam("userId") Long userId);

    @PutMapping("/user/updateUser")
    public Result updateUserById(@RequestBody UsersDTO user);

    @GetMapping("/user/selectUserByVipId")
    public Result<UsersDTO> selectUserByVipId(@RequestParam("userId") Long userId);
}
